﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;

namespace IService
{
    public interface IGroupMenuService
    {
        /// <summary>
        /// 新增模块
        /// </summary>
        /// <param name="groupMenu">模块实体</param>
        /// <returns>新增后的模块（包含自动生成的ID）</returns>
        Task<GroupMenu> CreateAsync(GroupMenu groupMenu);

        /// <summary>
        /// 根据ID查询模块
        /// </summary>
        /// <param name="groupId">模块ID</param>
        /// <returns>模块实体（无结果则返回null）</returns>
        Task<GroupMenu> GetByIdAsync(int groupId);

        /// <summary>
        /// 查询所有模块
        /// </summary>
        /// <returns>模块列表</returns>
        Task<List<GroupMenu>> GetAllAsync();

        /// <summary>
        /// 修改模块
        /// </summary>
        /// <param name="groupMenu">包含更新信息的模块实体</param>
        Task UpdateAsync(GroupMenu groupMenu);

        /// <summary>
        /// 根据ID删除模块
        /// </summary>
        /// <param name="groupId">模块ID</param>
        Task DeleteAsync(int groupId);
    }
}